home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / misc-part1 / 1775 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.5 KB

  1. Path: nntp.hut.fi!usenet
  2. From: Janne.Jalkanen@hut.fi (Janne Jalkanen)
  3. Newsgroups: comp.sys.amiga.misc
  4. Subject: Re: OS features
  5. Date: 16 Jan 1996 12:49:12 +0200
  6. Organization: Helsinki University of Technology, Finland
  7. Sender: jalkanen@freud.hut.fi
  8. Distribution: inet
  9. Message-ID: <m4d20p0mn2v.fsf@freud.hut.fi>
  10. References: <92747544038@PAPA.NORTH.DE> <4b3h9s$1st@alterdial.UU.NET>
  11.     <hmAVx*Y3f@yaps.rhein.de> <cg.75pf@ami-cg.GraySage.Edmonton.AB.CA>
  12.     <4d3t9e$mkv@hermes.louisville.edu>
  13. Reply-To: Janne.Jalkanen@hut.fi
  14. NNTP-Posting-Host: freud.hut.fi
  15. In-reply-to: krsear01@homer.louisville.edu's message of 11 Jan 1996 20:51:58
  16.     GMT
  17. X-Newsreader: Gnus v5.0.12
  18.  
  19. In article <4d3t9e$mkv@hermes.louisville.edu> krsear01@homer.louisville.edu (Kendall R. Sears) writes:
  20.  
  21. >What I propose is a system to segregate the system memory into 3 parts:
  22. >  1) an area for the OS that is protected from writes by user processes
  23. >  2) an area for user code that is write protected
  24. >  and
  25. >  3) a "public" area where the data segments of programs are stored as well
  26. >     as message ports, and other data that need to be accessed by multiple
  27. >     programs.
  28.  
  29. Something like MEMF_PUBLIC, MEMF_PROTECTED and MEMF_PRIVATE?  I have
  30. been toying around with a similar idea.  Code space would be allocated
  31. from protected memory space, so that crazed programs could not write
  32. over existing code (and self-modifying code works badly
  33. anyway). Private data would be specifically protected with the
  34. MEMF_PRIVATE flag and the application programmer would know upon
  35. writing the code that the data in it cannot be shared with other
  36. tasks. Old programs would be given MEMF_PUBLIC-type memory always so
  37. that they would continue to work, and crash each other. If the OS
  38. contained more checks against rogue pointers we could have a very
  39. stable OS with a very high degree compatability.
  40.  
  41. >Obviously, if a rogue program goes tromping through area 3 data could be
  42. >corrupted, but correctly written programs check packet validity upon receipt
  43. >to their port(s) and should be able to reject bad data, in the case where they
  44.  
  45. This means the OS also should be more picky about the data it gets.
  46.  
  47. >Obviously, use of the MMU to change the status of memory sections will create
  48. >some slowdown, but since most, if not all, changes will occur with a context
  49. >switch this probably won't be noticed.
  50.  
  51. I bet every serious Amiga programmer would be ready to live with it. I
  52. know I would =)
  53.  
  54. >We could even take this a little farther... Assume that an Area 3 is set up
  55. >for each process, when a process disappears (for any reason) the OS could
  56. >call a DeletePool() on the area to recover most allocated memory (assuming,
  57. >of course, that AllocMem() et al. is changed to call the pool functions.)
  58. >The OS could either use an age mechanism or a task that occasionally runs
  59. >the pools looking for headers that contain ids that no longer exist.
  60.  
  61. Resource tracking?  Would be fun... I'd also like to see an ability to
  62. reduce memory trashing, but this should come "almost free" with a VM
  63. solution. 
  64.  
  65. >This scheme wouldn't keep everything from crashing, nor would it be 100%
  66. >compatible, but I believe that it'd work and make the system much more
  67. >stable without significant speed penalties.
  68.  
  69. I also believe it might work.  It might also provide an upgrade path
  70. to full memory protection later on.
  71.  
  72. >Kendall.
  73. -- 
  74. Janne Jalkanen             ///!  For those who have to fight for it
  75. Janne.Jalkanen@hut.fi     /// !    life has a flavor
  76.          <*>          \\\///  !      the protected will never understand
  77. -'Keep on going...'    \XX/   !              (anonymous, Viet Nam, 1968)
  78.